package com.icinfo.cloud.provider.common.config;

import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * 描述：线程池配置类
 * @author shishengyao
 * @description
 * @date 2023/8/30
 */
public class ThreadPoolConfig {
    /**
     * 快速办理立案登记合并4本文书
     */
    public static final ThreadPoolExecutor FAST_CASE_REGISTER_DOCUMENT_POOL = new ThreadPoolExecutor(
            20,
            20,
            30L,
            TimeUnit.SECONDS,
            new LinkedBlockingQueue<>(1),
            r -> new Thread(r, "fast_case_register_document_pool-" + r.hashCode()),
            (r, executor) -> r.run());
}
